#ifndef __GAMESCREEN_H__
#define __GAMESCREEN_H__

#include <list>
#include <math.h>
#include <stdlib.h>

#include <GL/glut.h>

#include "Bgame.h"
#include "Screen.h"
#include "Collidable.h"
#include "Score.h"
#include "TimedEvent.h"

// forward declarations
class Cannon;
class Ball;
class Grid;
class Wall;
class Plane;

/*
 * Classe: GameScreen
 *  Herda de: Screen, TimedEvent
 *
 *   Tela do jogo propriamente dito
 *
*/

class GameScreen : public Screen, public TimedEvent
{
  private:
          std::list<Collidable *> * collidableObjects;
          
          Score * sessionScore;

          /*** Objetos de cena ***/
          Cannon * can;
          Ball * b;
          Wall * lw, * rw, * c;
          Plane * bg, * fbg;
          Grid * g;
          
          double longtime;
          /*** ***/
          
          bool stepDownNextRound;
          
          void stepDown();
  public:
         enum gameScreenEvents { STEP_DOWN };

         GameScreen( const char * stage );
         ~GameScreen();
         
         void display();
         
         void processFuncKeyDown(int key, int x1, int y1);
         void processFuncKeyUp(int key, int x, int y);
         
         void triggerEvent(int e);
};

#endif
